package river_city_ransom.services;

import river_city_ransom.types.ObjetNom;
import exceptions.ComposantError;


public interface Objet extends Equipable {
	/** _________________________________________________________ OBSERVATORS */
	public ObjetNom nom();
	public int valeur();
	public int bonusDeForce();
	public boolean estMarchandable();
	
	
	/** __________________________________________________________ INVARIANTS */
//	inv (bonusDeForce(O) = 0 ^ valeur(O) > 0) v (bonusDeForce(O) > 0 ^ valeur(O) = 0)
//	inv estEquipable(O) = bonusDeForce(O) > 0
//	inv estMarchandable(O) = !estEquipable(O)
	
	
	/** ________________________________________________________ CONSTRUCTORS */
//	pre init(n) require n != ""
//	post nom(init(n)) = n
//	post estPorte(init(n)) = false
//	post estJete(init(n)) = 0
//	post position(init(n)) = Position::init(0, 0, 0)
//	post si n = CINQUANTE_CENTIMES { dimensions(init(n)) = Dimensions::init(5, 5, 1)
//								   { valeur(init(n)) = 50
//								   { bonusDeForce(init(n)) = 0
//	post si n = UN_DOLLAR { dimensions(init(n)) = Dimensions::init(5, 5, 1)
//						  { valeur(init(n)) = 100
//						  { bonusDeForce(init(n)) = 0
//	post si n = CHAINE_DE_VELO { dimensions(init(n)) = Dimensions::init(15, 5, 5)
//							   { valeur(init(n)) = 0
//							   { bonusDeForce(init(n)) = 10
//	post si n = POUBELLE_METALLIQUE { dimensions(init(n)) = Dimensions::init(10, 15, 10)
//									{ valeur(init(n)) = 0
//									{ bonusDeForce(init(n)) = 15
	public void init(ObjetNom n) throws ComposantError;
	
	
	/** ___________________________________________________________ OPERATORS */
//	post estPorte(deplacer(O, p)) = estPorte(O)
//	post estJete(deplacer(O, p)) = estJete(O)
//	post position(deplacer(O, p)) = p
	public void deplacer(Position p) throws ComposantError;
}
